<script>
Element.hide('loading');
$('resource_title').value = '<%= @bad_link ? 'bad link' : @resource_title%>';
Element.show('resource_title');
Element.show('resource_description');
</script>